#ifndef FILEIO_H
#define FILEIO_H
#include <stddef.h>

#include "../Include/fileio_pub.h"

// 模块内部函数声明
int parse_student_line(const char* line, char* id, char* name, int* course_count, float* total_credits);
int parse_course_line(const char* line, char* id, char* name, char* type, int* hours, float* credits, int* student_count, int* max_students);
int format_student_line(char* buffer, size_t size, Student* student);
int format_course_line(char* buffer, size_t size, Course* course);
void trim_whitespace(char* str);
int is_comment_line(const char* line);
int ensure_file_exists(const char* filename);

#endif
